package com.bupt.ilink.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bupt.ilink.entity.Studyspace.StudyTeacherCoursesFavorite;
import com.bupt.ilink.entity.Studyspace.tree.StudyTreeFavorite;
import com.bupt.ilink.service.StudyTeacherCoursesFavoriteService;
import com.bupt.ilink.mapper.StudyTeacherCoursesFavoriteMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author LENOVO
* @description 针对表【study_teacher_courses_favorite】的数据库操作Service实现
* @createDate 2024-08-16 16:22:39
*/
@Service
public class StudyTeacherCoursesFavoriteServiceImpl extends ServiceImpl<StudyTeacherCoursesFavoriteMapper, StudyTeacherCoursesFavorite>
    implements StudyTeacherCoursesFavoriteService{
    @Autowired
    private StudyTeacherCoursesFavoriteMapper studyTeacherCoursesFavoriteMapper;

    @Override
    public List<StudyTeacherCoursesFavorite> getFavoriteListByUserId(String userId) {
        return studyTeacherCoursesFavoriteMapper.selectList(
                new LambdaQueryWrapper<StudyTeacherCoursesFavorite>()
                        .eq(StudyTeacherCoursesFavorite::getUserId, userId)
        );
    }
}




